<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
	<head>
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<meta charset="UTF-8">
		<title>微信支付</title>
		<link rel="stylesheet" th:href="@{/static/assets/aui/css/aui.css}" media="all">
		<script th:src="@{/static/assets/scripts/jquery.min.js}"></script>
		<script type="text/javascript" th:src="@{/static/assets/aui/script/aui-toast.js}" ></script>
	</head>

	<body>
		<div class="aui-content aui-margin-b-15">
			<ul class="aui-list aui-form-list">
				<li class="aui-list-item">
					<div class="aui-list-item-inner">
						<div class="aui-list-item-label">
							支付金额
						</div>
						<div class="aui-list-item-input">
							<input type="text" placeholder="请输入交易金额">
						</div>
					</div>
				</li>
				<li>
					<div class="aui-btn aui-btn-primary aui-btn-block aui-btn-outlined" id="pay">去付款</div>
				</li>
			</ul>
		</div>
	</body>
	<script th:inline="javascript" type="text/javascript">
        var ctxPath  = [[@{/}]];
	</script>
	<script>
		$("#pay").click(function() {
			var param={};
			var mount=$(".aui-list-item-input>input").val();
			if(!mount){
                toast.fail({
                    title:"请输出金额",
                    duration:2000
                });
				return false;
			}
			param.money=mount;
			alert("支付金额："+mount)
			$.ajax({
				type: "post",
				url: ctxPath+"WxPay/createQRCodeMweb",
				contentType: "application/json",
				data:JSON.stringify(param),
				async: true,
				success:function(data){
					console.log(data);
				}
			});

		})
	</script>

</html>